package com.lycx.businessmanager.service.impl;

import java.util.List;

import com.lycx.businessmanager.constant.ConstantsDbOperation;
import com.lycx.businessmanager.dao.SequenceDao;
import com.lycx.businessmanager.model.Sequence;
import com.lycx.businessmanager.service.ISequenceService;

public class SequenceServiceImpl implements ISequenceService {

	private SequenceDao sequenceDao;
	
	
	public void setSequenceDao(SequenceDao sequenceDao) {
		this.sequenceDao = sequenceDao;
	}

    @SuppressWarnings("unchecked")
	public List<Sequence> select(Sequence sequence){
    	return (List<Sequence>)sequenceDao.select(ConstantsDbOperation.SEQUENCE_SELECT, sequence);
    }
	
	@Override
	public void update(Sequence sequence) {
		sequenceDao.update(ConstantsDbOperation.SEQUENCE_UPDATE, sequence);
	}

	@Override
	public Sequence selectOne(Sequence sequence) {
		return (Sequence)sequenceDao.selectOne(ConstantsDbOperation.SEQUENCE_SELECT, sequence);
	}

}
